package dao.impl;

import java.sql.SQLException;
import java.util.List;

import com.ibatis.sqlmap.client.SqlMapClient;

import module.RequirementHouse;
import dao.ABSBasicDAO;
import domain.vo.queryObject;
/**
 * 
* @ClassName: RequirementHouseDAOImpl
* @Description: 房屋需求DAO实现类
* @author chenchao
* @date 2013-10-31 上午06:02:30
*
 */
public class RequirementHouseDAOImpl  extends ABSBasicDAO<RequirementHouse>{
	/**
	 * 构造方法
	 * @param sqlMapClient
	 */
	public RequirementHouseDAOImpl(SqlMapClient sqlMapClient) {
		super(sqlMapClient);
	}
	
	/* (non-Javadoc)
	 * @see dao.ABSBasicDAO#getAll()
	 */
	@Override
	public List<RequirementHouse> getAll() throws SQLException {
		// TODO Auto-generated method stub
		return sqlMapClient.queryForList("RequirementHouse.getAll");
	}

	/* (non-Javadoc)
	 * @see dao.ABSBasicDAO#getById(java.lang.String)
	 */
	@Override
	public RequirementHouse getById(String id) throws SQLException {
		// TODO Auto-generated method stub
		return (RequirementHouse)sqlMapClient.queryForObject("RequirementHouse.getById", id);
	}

	/* (non-Javadoc)
	 * @see dao.ABSBasicDAO#insertT(java.lang.Object)
	 */
	@Override
	public void insertT(RequirementHouse t) throws SQLException {
		sqlMapClient.insert("RequirementHouse.insertRequirementInfo", t);
	}

	/* (non-Javadoc)	
	 * @see dao.ABSBasicDAO#updateT(java.lang.Object)
	 */
	@Override
	public void updateT(RequirementHouse t) throws SQLException {
		sqlMapClient.update("RequirementHouse.updateRequirementInfo", t);
	}

	/* (非 Javadoc) 
	* <p>Title: getObjectByQueryObject</p> 
	* <p>Description: </p> 
	* @param queryObject
	* @return
	* @throws SQLException 
	* @see dao.ABSBasicDAO#getObjectByQueryObject(domain.vo.queryObject) 
	*/ 
	
	
	@Override
	public List<RequirementHouse> getObjectByQueryObject(queryObject queryObject)
			throws SQLException {
		return sqlMapClient.queryForList("RequirementHouse.getRHByQueryObject", queryObject);
	}

	/* (非 Javadoc) 
	* <p>Title: countByQueryObject</p> 
	* <p>Description: </p> 
	* @param queryObject
	* @return
	* @throws SQLException 
	* @see dao.ABSBasicDAO#countByQueryObject(domain.vo.queryObject) 
	*/ 
	
	
	@Override
	public int countByQueryObject(queryObject queryObject) throws SQLException {
		return (Integer)sqlMapClient.queryForObject("RequirementHouse.countRHByQueryObject",queryObject);
	}
	
	
	
}
